package cn.easy.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 张澎_9970
 * @date 2021.12.15 下午 3:08 星期三
 * @desc:
 */
@Configuration
public class AdvancedConfig {
    @Bean
    public Queue createQueue() {
        return new Queue("Qu_01");
    }

    @Bean
    public DirectExchange createExchange() {
        return new DirectExchange("Ex_01");
    }

    @Bean
    public Binding createBinding() {
        return BindingBuilder.bind(createQueue()).to(createExchange()).with("item.insert");
    }
}
